<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" scroll="no">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
<!--Basic Styles-->
<link href="../../framework/css/font.css" rel="stylesheet" />
<link href="../../framework/miniui/themes/material/miniui.css"
	rel="stylesheet" />
<link href="../../framework/css/app.min.1.css" rel="stylesheet"
	type="text/css" />
<link href="../../framework/css/app.min.2.css" rel="stylesheet"
	type="text/css" />
<script src="../../framework/main.js" type="text/javascript"></script>
<style type="text/css">
html, body {
	margin: 0;
	padding: 0;
	border: 0;
	width: 100%;
	height: 100%;
}

.input-group-addon {
	width: 80px;
	text-align: right;
	
}
</style>
<script type="text/javascript">
    mini.parse();
     function uploadPic(tmp) {
         var id = "";
         var img = "";
        if(tmp=="wx"){
        	id = $("#Wid").val();
        	img = "#Wximg";
        }else if(tmp=="bb"){
        	id = $("#Bid").val();
        	img = "#Bbimg";
            }
     	mini.open({
     		title : '上传照片',
     		url : '${ctx}eao/imageUpload.jhtml?Id='+id,
     		width : 500,
     		height : 200,
     		onLoad : function() {
     		},
     		onOk:function(){
     			$DW.uploadSave(function(attachs){
     		 		$D.close();
     		 		$(img).attr('src', attachs);
     			});
     		}
     	});
     }

     function updateCompany(){
    		var EnterpriseName = mini.get("EnterpriseName").value;
			var Address = mini.get("Address").value;
			var Phone = mini.get("Phone").value;
			var URL = mini.get("URL").value;
			var Qid = $("#Qid").val();
			
    	  var dc = {Id:Qid,EnterpriseName:EnterpriseName,Address:Address,Phone:Phone,URL:URL};
    	   Server.sendRequest("EaoGrid.saveOrUpdateCompany",dc,function(response){
				if(response.Status == 1){
					top.mini.showTips({content:response.Message,state:'success'});
				}else{
					top.mini.warn(response.Message);
				}
			}); 
         } 
     function updateWx(){
		var Title = mini.get("Title").value;
		var Content = $("#Content").val();
		var Wid = $("#Wid").val();
		var dc = {Id:Wid,Title:Title,Content:Content};
		Server.sendRequest("EaoGrid.saveOrUpdateWx",dc,function(response){
		if(response.Status == 1){
			console.log(response);
			top.mini.showTips({content:response.Message,state:'success'});
		}else{
			top.mini.warn(response.Message);
		}
		});
      } 
     function updateVersion(){
 		var VersionExplain = $("#VersionExplain").val();
 		var SoftwareUserAgreement = $("#SoftwareUserAgreement").val();
 		var Version = $("#Version").val();
 		var Bid = $("#Bid").val();
 		var dc = {Id:Bid,VersionExplain:VersionExplain,SoftwareUserAgreement:SoftwareUserAgreement,Version:Version};
 		Server.sendRequest("EaoGrid.saveOrUpdateVersion",dc,function(response){
 		if(response.Status == 1){
 			top.mini.showTips({content:response.Message,state:'success'});
 		}else{
 			top.mini.warn(response.Message);
 		}
 		});
       } 
  </script>
</head>
<body class="body-dialog">
  <ef:init method="EaoGrid.selectMe">
		<div class="container-fluid" style="margin-top: 10px;">
			<div class="row">
				<div class="col-xs-6" style="margin-left:2%;width:600px;margin-top:20px">
				<div class="card" style="padding-left: 20px;height:500px;">
				<p style="margin-top:10px">
				<input type="hidden" id="Wid" value="${Wid }"/>
				 <span style="font-size: 20px;">微信公众号</span>
				 <span style="margin-left:60%">
				 <a class="mini-button"  onclick="updateWx();" style="background:transparent;color:blue;font-size: 16px" plain="true">修改</a>
				</span>
				 </p>
				 <div style="width:100%;height:200px;text-align: center;">
				 <div style="height: 100%;">
				 	<img src=" ${wimg.ImgUrl }" id="Wximg" style="width: 40%;background: #eee;height:100%;cursor:pointer " onclick="uploadPic('wx');">
				</div>
				</div>
					<div class="input-group" style="width:100%;margin-left: 20px;text-align: center;">
						<div style="width: 100%">
						<input class="mini-textbox" value="${Title }"
					width="155" required="true" id="Title" size="30"/>
						</div>
						<br/>
						<textarea style="width: 65%" id="Content" autocomplete="off">${Content }</textarea>
					</div>
				</div>
		        </div>
				<div class="col-xs-6" style="margin-left:2%;width:600px;margin-top:20px">
				<div class="card" style="padding-left: 20px;height:500px;">
				<p style="margin-top:10px">
				 <span style="font-size: 20px;">版本信息</span>
				 <input type="hidden" value="${Bid }" id="Bid"/>
				 <span style="margin-left:60%">
				 <a class="mini-button"  onclick="updateVersion();" style="background:transparent;color:blue;font-size: 16px" plain="true">修改</a>
				</span>
				 </p>
				 <div style="width:100%;height:200px;text-align: center;">
				 <div style="height: 100%;">
			 		 <img src="${bimg.ImgUrl }" id="Bbimg" style="width: 40%;background: #eee;height:100%;cursor:pointer " onclick="uploadPic('bb');">
				</div>
				</div>
					<div class="input-group" style="width:100%;margin-left: 5px;text-align: center;">
						<div style="width: 100%">
						<span>版本号</span>
						<br/>
						<textarea style="width: 65%" id = "Version">${Version}</textarea>
						<br/>
						<span>版本信息</span>
						<br/>
						<textarea style="width: 65%" id = "VersionExplain">${VersionExplain }</textarea>
						<br/>
						<span>软件用户协议</span>
						<br/>
						<textarea style="width: 65%" id = "SoftwareUserAgreement">${SoftwareUserAgreement }</textarea>
					</div>
				</div>
			</div>
			</div>
			</div>
			<div class="row">
			<div class="col-xs-6" style="margin-left:2%;width:600px;margin-top:20px">
				<div class="card" style="padding-left: 20px;height:420px;">
	    	<p style="margin-top:10px;">
				 <span style="font-size: 20px;">联系我们</span>
				 <input type="hidden" id="Qid" value="${Qid }"/>
				 <span style="margin-left:60%">
				 <a class="mini-button"  onclick="updateCompany();" style="background:transparent;color:blue;font-size: 16px" plain="true">修改</a>
				</span>
				 </p>
				<div class="input-group" style="margin-left: 20px;">
					<span class="input-group-addon"><label for="Code$text">公司名称:</label></span>
					<input class="mini-textbox" value="${EnterpriseName}"
						width="300" required="true" id="EnterpriseName" size="30" />
				</div>
				<div class="input-group" style="margin-left: 20px;">
					<span class="input-group-addon"><label for="Name$text">公司地址:</label></span>
					<input class="mini-textbox" value="${Address}"
						width="300" required="true" id="Address" size="30"/>
				</div>

				<div class="input-group" style="margin-left: 20px;">
					<span class="input-group-addon"><label for="Name$text">联系电话:</label></span>
					<input class="mini-textbox" value="${Phone}"
						width="300" required="true" id="Phone" size="30"/>
				</div>
				<div class="input-group" style="margin-left: 20px;">
					<span class="input-group-addon"><label for="Name$text">公司网址:</label></span>
					<input class="mini-textbox" value="${URL}"
						width="300" required="true" id="URL" size="30"/>
				</div>
			</div>
			</div>
		   </div>
		</div>  
</ef:init>
 </body>
</html>
<!-- Generated by Wisc cost:55ms ip:f.14.79.104 -->